package com.naiterui.ehp.bs.im.network.protocl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 个性化定制消息格式
 *
 * @author Ldl
 */
public class CustomizedMessage implements IChecker, Serializable {

    private static final long serialVersionUID = -2831627100387804434L;

    /**
     * 患者发送给医生病历消息
     */
    public static final int SPEC_MESS_TYPE_PATIENTS_MEDICAL_RECORD = 1;
    /**
     * 患者发送给医生病情描述
     */
    public static final int SPEC_MESS_TYPE_PATIENTS_DISEASE_RECORD = 2;
    /**
     * 患者给专家名医首次发消息提示消息
     */
    public static final int SPEC_MESS_TYPE_PATIENTS_CLINICFIRST_RECORD = 3;

    /**
     * 消息主体文本
     */
    private String text;
    /**
     * 具体化消息类型
     */
    private Integer specificMessageType;
    /**
     * 病情id
     */
    private String diseaseId;
    private String recordId;// 记录id

    public static class HrefContent {
        @JSONField(name = "K")
        private String k;
        @JSONField(name = "V")
        private String v;
        List<Params> params = new ArrayList<>();

        public static class Params {
            private String name;
            private String value;

            public Params(String name, String value) {
                this.name = name;
                this.value = value;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getValue() {
                return value;
            }

            public void setValue(String value) {
                this.value = value;
            }
        }


        public List<Params> getParams() {
            return params;
        }

        public void setParams(List<Params> params) {
            this.params = params;
        }

        public String getK() {
            return k;
        }

        public void setK(String k) {
            this.k = k;
        }

        public String getV() {
            return v;
        }

        public void setV(String v) {
            this.v = v;
        }
    }

    @Override
    public boolean selfValidate() {
        return true;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getSpecificMessageType() {
        return specificMessageType;
    }

    public void setSpecificMessageType(Integer specificMessageType) {
        this.specificMessageType = specificMessageType;
    }

    public String getDiseaseId() {
        return diseaseId;
    }

    public void setDiseaseId(String diseaseId) {
        this.diseaseId = diseaseId;
    }

    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId;
    }
}
